import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

final localProvider = ChangeNotifierProvider<LocaleNotifier>((ref) => LocaleNotifier());

class LocaleNotifier extends ChangeNotifier {
  Locale? locale;

  void refresh({Locale? sender}) {
    if (sender == locale) return;
    locale = sender;
    notifyListeners();
  }
}
